package com.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginServlet extends HttpServlet{

	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
		response.setContentType("text/html;charset=utf-8");
		
		PrintWriter out = response.getWriter();
		out.println("<form action ='' method = 'get'>");
		out.println("<input name ='userName'>");
		out.println("<input name ='password'>");
		out.println("<input type ='submit'>");
		out.println("</form>");
		
		String msg = (String) request.getAttribute("msg");
		if(msg!=null){
			out.println(msg);
		}
		
	}
	
	

}
